Skip to main content

HolographLogger

Services • API


Holograph SDK Reference / Services / HolographLogger

Class: HolographLogger

Extends

  • Pick<PinoMethods, "error" | "trace" | "debug" | "info" | "warn" | "fatal">

Constructors

new HolographLogger(pinoLogger, context)

private new HolographLogger(pinoLogger, context): HolographLogger

Parameters

pinoLogger: Logger<LoggerOptions>

context: HolographLoggerContext

Returns

HolographLogger

Overrides

baseClassSimulacrum<PinoMethods>().constructor

Source

packages/sdk/src/services/logger.service.ts:29

Properties

context

protected context: HolographLoggerContext

Source

packages/sdk/src/services/logger.service.ts:29


debug

debug: LogFn

Log at 'debug' level the given msg. If the first argument is an object, all its properties will be included in the JSON line. If more args follows msg, these will be used to format msg using util.format.

Type Param

the interface of the object being serialized. Default is object.

Param

object to be serialized

Param

the log message to write

Param

format string values when msg is a format string

Inherited from

baseClassSimulacrum<PinoMethods>().debug

Source

node_modules/.pnpm/pino@8.16.2/node_modules/pino/pino.d.ts:201


error

error: LogFn

Log at 'error' level the given msg. If the first argument is an object, all its properties will be included in the JSON line. If more args follows msg, these will be used to format msg using util.format.

Type Param

the interface of the object being serialized. Default is object.

Param

object to be serialized

Param

the log message to write

Param

format string values when msg is a format string

Inherited from

baseClassSimulacrum<PinoMethods>().error

Source

node_modules/.pnpm/pino@8.16.2/node_modules/pino/pino.d.ts:171


fatal

fatal: LogFn

Log at 'fatal' level the given msg. If the first argument is an object, all its properties will be included in the JSON line. If more args follows msg, these will be used to format msg using util.format.

Type Param

the interface of the object being serialized. Default is object.

Param

object to be serialized

Param

the log message to write

Param

format string values when msg is a format string

Inherited from

baseClassSimulacrum<PinoMethods>().fatal

Source

node_modules/.pnpm/pino@8.16.2/node_modules/pino/pino.d.ts:161


info

info: LogFn

Log at 'info' level the given msg. If the first argument is an object, all its properties will be included in the JSON line. If more args follows msg, these will be used to format msg using util.format.

Type Param

the interface of the object being serialized. Default is object.

Param

object to be serialized

Param

the log message to write

Param

format string values when msg is a format string

Inherited from

baseClassSimulacrum<PinoMethods>().info

Source

node_modules/.pnpm/pino@8.16.2/node_modules/pino/pino.d.ts:191


pinoLogger

private pinoLogger: Logger<LoggerOptions>

Source

packages/sdk/src/services/logger.service.ts:29


trace

trace: LogFn

Log at 'trace' level the given msg. If the first argument is an object, all its properties will be included in the JSON line. If more args follows msg, these will be used to format msg using util.format.

Type Param

the interface of the object being serialized. Default is object.

Param

object to be serialized

Param

the log message to write

Param

format string values when msg is a format string

Inherited from

baseClassSimulacrum<PinoMethods>().trace

Source

node_modules/.pnpm/pino@8.16.2/node_modules/pino/pino.d.ts:211


warn

warn: LogFn

Log at 'warn' level the given msg. If the first argument is an object, all its properties will be included in the JSON line. If more args follows msg, these will be used to format msg using util.format.

Type Param

the interface of the object being serialized. Default is object.

Param

object to be serialized

Param

the log message to write

Param

format string values when msg is a format string

Inherited from

baseClassSimulacrum<PinoMethods>().warn

Source

node_modules/.pnpm/pino@8.16.2/node_modules/pino/pino.d.ts:181


config

protected static config: object

level

level: "error" | "trace" | "debug" | "info" | "warn" | "fatal" = logLevelSchema

Source

packages/sdk/src/services/logger.service.ts:27

Methods

addContext()

addContext(context): HolographLogger

Parameters

context: HolographLoggerContext

Returns

HolographLogger

Source

packages/sdk/src/services/logger.service.ts:82


getContext()

getContext(): HolographLoggerContext

Returns

HolographLoggerContext

Source

packages/sdk/src/services/logger.service.ts:58


logHolographError()

logHolographError(error): void

Parameters

error: HolographError

Returns

void

Source

packages/sdk/src/services/logger.service.ts:48


createLogger()

static createLogger(input): HolographLogger

Parameters

input: HolographLoggerContext

Returns

HolographLogger

Source

packages/sdk/src/services/logger.service.ts:63


maybeAddTraceId()

static maybeAddTraceId(logger): HolographLogger

Parameters

logger: HolographLogger

Returns

HolographLogger

Source

packages/sdk/src/services/logger.service.ts:74